#include "tcpClient.hpp"
#include <iostream>
#include <memory>

using namespace Client;

inline void Usage(std::string proc)
{
    std::cerr << "Usage : \n\t" << proc << " server_ip server_port\n\n";
}


int main(int argc, char* argv[])
{
    if (argc != 3)
    {
        Usage(argv[0]);
        exit(USAGE_ERROR);
    }

    std::string server_ip = argv[1];
    uint16_t server_port = atoi(argv[2]);

    std::unique_ptr<TcpClient> tcpclient(new TcpClient(server_ip, server_port));

    tcpclient->init();
    tcpclient->start();

    return 0;
}